//package com.cli.apisdk.register;
//
//import com.github.lianjiatech.retrofit.spring.boot.core.Constants;
//import com.github.lianjiatech.retrofit.spring.boot.core.SourceOkHttpClientRegistrar;
//import com.github.lianjiatech.retrofit.spring.boot.core.SourceOkHttpClientRegistry;
//import lombok.extern.slf4j.Slf4j;
//import okhttp3.OkHttpClient;
//import org.springframework.stereotype.Component;
//
///**
// * @author: xiongmin
// * @since create by 2022/7/15 18:39
// */
//@Slf4j
//@Component
//public class CustomSourceOkHttpClientRegistrar implements SourceOkHttpClientRegistrar {
//    @Override
//    public void register(SourceOkHttpClientRegistry registry) {
//
//        // 替换默认的SourceOkHttpClient
//        registry.register(Constants.DEFAULT_SOURCE_OK_HTTP_CLIENT, new OkHttpClient.Builder()
//                .addInterceptor(chain -> {
//                    log.info("============替换默认的SourceOkHttpClient=============");
//                    return chain.proceed(chain.request());
//                })
//                .build());
//
//        // 添加新的SourceOkHttpClient
//        registry.register("testSourceOkHttpClient", new OkHttpClient.Builder()
//                .addInterceptor(chain -> {
//                    log.info("============使用testSourceOkHttpClient=============");
//                    return chain.proceed(chain.request());
//                })
//                .build());
//    }
//}
